﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClickAdMonitor.aspx.cs" Inherits="RosarioFinanzas.Monitor.ClickAdMonitor" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Rosario Finanzas - Advertising's Monitor </title>
    <meta name="description" content="Advertising's Monitor" />
    
    <link rel="shortcut icon" href="http://rosariofinanzas.com.ar/Imagenes/RF_favicon.ico" type="image/x-icon">
    <link rel="icon" href="http://rosariofinanzas.com.ar/Imagenes/RF_favicon.ico" type="image/x-icon">

    <link href="../CSS/Master.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Master.css?ver=1.6" rel="stylesheet" type="text/css" />
    <link href="../CSS/jquery/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
    <link href="CSS/style.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Botones.css" rel="stylesheet" />
    <link href="../Sorteo/CSS/Sorteo.css" rel="stylesheet" />
    
    <script src="../scripts/jquery/jquery-1.11.2.min.js" type="text/javascript"></script>
    <script src="../scripts/jquery/jquery-ui-1.8.14.custom.js" type="text/javascript"></script>
    <script src="../scripts/jquery/jquery.tablesorter.min.js" type="text/javascript"></script>
    <script src="../scripts/jquery/jquery.tablesorter.pager.min.js" type="text/javascript"></script>
    <script src="../scripts/jquery/jquery.tablesorter.widgets.min.js" type="text/javascript"></script>


    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-28485653-1']);
        _gaq.push(['_trackPageview']);

        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
        var id;
        $(document).ready(function () {

            $('#lblIdAuspiciante').hide();

            PageMethods.strFecha('1', fnfechaOK, fnLlamadaError);

            function fnfechaOK(resultado) {

                $('#Fecha').html(resultado);

            }

            function fnLlamadaError(excepcion) {
                alert('No se pudo ejecutar');
            }

            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }

            var idAuspiciante = getUrlVars()["id"];
                        
            PageMethods.strContenidoTabla(idAuspiciante, fnContenidoTablaOK, fnContenidoTablaError);

           
            function fnContenidoTablaOK(resultado) {

                $("#table tbody").html(resultado);

                // call the tablesorter plugin
                $("#table").tablesorter({
                    theme: 'blue',

                    // hidden filter input/selects will resize the columns, so try to minimize the change
                    widthFixed: true,

                    // initialize zebra striping and filter widgets
                    widgets: ["zebra", "filter"],

                    ignoreCase: false,

                    widgetOptions: {

                        // filter_anyMatch options was removed in v2.15; it has been replaced by the filter_external option

                        // If there are child rows in the table (rows with class name from "cssChildRow" option)
                        // and this option is true and a match is found anywhere in the child row, then it will make that row
                        // visible; default is false
                        filter_childRows: false,

                        // if true, a filter will be added to the top of each table column;
                        // disabled by using -> headers: { 1: { filter: false } } OR add class="filter-false"
                        // if you set this to false, make sure you perform a search using the second method below
                        filter_columnFilters: true,

                        // css class name added to the filter cell (string or array)
                        filter_cellFilter: '',

                        // extra css class name(s) applied to the table row containing the filters & the inputs within that row
                        // this option can either be a string (class applied to all filters) or an array (class applied to indexed filter)
                        filter_cssFilter: '', // or []

                        // add a default column filter type "~{query}" to make fuzzy searches default;
                        // "{q1} AND {q2}" to make all searches use a logical AND.
                        filter_defaultFilter: {},

                        // filters to exclude, per column
                        filter_excludeFilter: {},

                        // jQuery selector (or object) pointing to an input to be used to match the contents of any column
                        // please refer to the filter-any-match demo for limitations - new in v2.15
                        filter_external: '',

                        // class added to filtered rows (rows that are not showing); needed by pager plugin
                        filter_filteredRow: 'filtered',

                        // add custom filter elements to the filter row
                        // see the filter formatter demos for more specifics
                        filter_formatter: null,

                        // add custom filter functions using this option
                        // see the filter widget custom demo for more specifics on how to use this option
                        filter_functions: null,

                        // hide filter row when table is empty
                        filter_hideEmpty: true,

                        // if true, filters are collapsed initially, but can be revealed by hovering over the grey bar immediately
                        // below the header row. Additionally, tabbing through the document will open the filter row when an input gets focus
                        filter_hideFilters: true,

                        // Set this option to false to make the searches case sensitive
                        filter_ignoreCase: true,

                        // if true, search column content while the user types (with a delay)
                        filter_liveSearch: true,

                        // a header with a select dropdown & this class name will only show available (visible) options within that drop down.
                        filter_onlyAvail: 'filter-onlyAvail',

                        // default placeholder text (overridden by any header "data-placeholder" setting)
                        filter_placeholder: { search: '', select: '' },

                        // jQuery selector string of an element used to reset the filters
                        filter_reset: 'button.reset',

                        // Use the $.tablesorter.storage utility to save the most recent filters (default setting is false)
                        filter_saveFilters: true,

                        // Delay in milliseconds before the filter widget starts searching; This option prevents searching for
                        // every character while typing and should make searching large tables faster.
                        filter_searchDelay: 300,

                        // allow searching through already filtered rows in special circumstances; will speed up searching in large tables if true
                        filter_searchFiltered: true,

                        // include a function to return an array of values to be added to the column filter select
                        filter_selectSource: null,

                        // if true, server-side filtering should be performed because client-side filtering will be disabled, but
                        // the ui and events will still be used.
                        filter_serversideFiltering: false,

                        // Set this option to true to use the filter to find text from the start of the column
                        // So typing in "a" will find "albert" but not "frank", both have a's; default is false
                        filter_startsWith: false,

                        // Filter using parsed content for ALL columns
                        // be careful on using this on date columns as the date is parsed and stored as time in seconds
                        filter_useParsedData: false,

                        // data attribute in the header cell that contains the default filter value
                        filter_defaultAttrib: 'data-value',

                        // filter_selectSource array text left of the separator is added to the option value, right into the option text
                        filter_selectSourceSeparator: '|'

                    }

                });
                
            }

            function fnContenidoTablaError(excepcion) {
                alert('Ha ocurrido un error al intentar obtener los datos');
            }
            
        });



    </script>
</head>
<body>
    <form id="form1" runat="server">
         <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="True">
        </asp:ScriptManager>
     <div id="Contenedor">
            <div id="Cabecera">
                
                    <div id="Fecha">
                        
                    </div>                

                <div class="Region">
                    Rosario, Santa Fe, Argentina
                </div>
                <a href="http://rosariofinanzas.com.ar">
                    <img class="Cabecera" src="http://rosariofinanzas.com.ar/Imagenes/cabecera3.png" /></a>
            </div>
             <div id="Contenido" style="position:relative; text-align:center;" >
                 <br />
                <asp:Label ID="lblDesc3" runat="server" Text="Monitor de Clicks en Publicidades" Font-Size="17pt" Font-Overline="False" Font-Names="Trebuchet MS" ForeColor="White"  ></asp:Label>
                 <br />
            <table id="table" class="tablesorter">
                <thead>
                    <tr>            
                        <th data-placeholder="">Nombre del auspiciante</th>
                        <th data-placeholder="">Web de origen del Click</th>
                        <th data-placeholder="" >Fecha del Click</th>
                        <th data-placeholder="" >Hora del Click</th>

                    </tr>
                </thead>
                <tbody>
                    <%--Llenar dinámicamente esta sección con los registros obtenidos desde base de datos--%>
          

                </tbody>
            </table>

             </div>   

         </div>     
    </form>
</body>
</html>
